﻿package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author linda
	 */
	public class Main extends Sprite 
	{
		
		public function Main():void 
		{
			var myPattern :RegExp = /幹|幹你娘|媽的|機掰|操/g;

var instr:String = "幹!機車壞了!機掰~叫媽媽來!!媽的";//輸入的字串
var clean:String = "哈哈";//替代的文字
instr.replace(myPattern,clean);//inter文字中與mypattern相同的字句用clean代替
trace(instr);
trace(instr.replace(myPattern,clean));
		}
		
		
	}
	
}